﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/MasterPage.master" AutoEventWireup="true" CodeFile="New_Type.aspx.cs" Inherits="Manage_New_Type" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
    #new_add_table{ width:99%;border-collapse:collapse; empty-cells:show; margin-left:8px; margin-top:10px; margin-bottom:20px;}
    #new_add_table tr{ height:29px;background:#f6f6f6;}
    #new_add_table tr td{ border:#d8d8d8 1px solid; vertical-align:middle;}
    #new_add_table tr .td1{ width:110px; text-align:right; padding-right:15px;}
    #new_add_table tr .td2{ padding-left:10px;}
     .hide{ color:#04b0cf; padding:15px; height:150px;background-color:#cececd;position:absolute; top:180px; 
            width:320px; left:40%; margin-left:-100px; border:soild 1px #a6a6a6;
            filter:alpha(opacity=80);opacity:0.8; text-align:center; vertical-align:middle;}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

        <asp:Panel ID="big" runat="server" CssClass="hide" Visible="false">
             <div style=" float:left; font-weight:bold">添加大类</div><div style=" float:right">
                 <asp:ImageButton ID="cancel1" runat="server" onclick="cancel_Click" ImageUrl="~/Manage/images/closebutton_hover.gif"/></div><br /><br />
             大类名称<asp:TextBox ID="addbigclassname" runat="server"></asp:TextBox>&nbsp;&nbsp;&nbsp;<br /><br />
             大类URL:<asp:TextBox ID="addbigclassurl" runat="server"></asp:TextBox><br /><br />
            <div style=" float:right; margin-bottom:-10px;"><asp:Button ID="buttonbigadd" runat="server" Text="确认添加" onclick="buttonbigadd_Click" /> </div> 
        </asp:Panel>
        <asp:Panel ID="small" runat="server" CssClass="hide" Visible="false">
        <div style=" float:right; font-weight:bold">添加小类&nbsp;&nbsp;<asp:ImageButton ID="cancel2" runat="server" onclick="cancel_Click" ImageUrl="~/Manage/images/closebutton_hover.gif"/></div>
            <br /><br />
            <asp:HiddenField ID="Hiddenid" runat="server" />
             小类名称<asp:TextBox ID="addsmallclassname" runat="server"></asp:TextBox>&nbsp;&nbsp;&nbsp;<br /><br />
             小类URL:<asp:TextBox ID="addsmallclassurl" runat="server"></asp:TextBox><br /><br />
            <div style=" float:left; margin-bottom:-10px;"> <asp:Button ID="buttonsmalladd" runat="server" Text="确认添加"  onclick="buttonsmalladd_Click" /></div>
        </asp:Panel>  

<table id="new_add_table">
   <tr style=" height:25px; background:url('images/tt_x.gif') repeat-x;">
     <td colspan="2" style=" padding-left:8px;">管理新闻分类
     
     <asp:LinkButton ID="badd" runat="server" onclick="badd_Click" style="margin-left:640px;">
       <img  src="images/add.gif" alt="" style=" margin-bottom:-4px; margin-right:4px;" />添加大类
     </asp:LinkButton>
     </td>
   </tr>
<asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound" OnItemCommand="Repeater1_ItemCommand">
   <ItemTemplate>
    <tr>
      <td  colspan="2" style=" border-bottom:0px;">
         <img src="images/tplus.gif" alt="" style=" margin-bottom:-5px; margin-right:8px;" />
         <img src="images/folders.gif" alt="" style=" margin-bottom:-3px; margin-right:8px;"/>
         [<asp:Label ID="bigid" runat="server" Text='<%# Eval("bigclassid")%>'></asp:Label>]
         名称:<asp:TextBox ID="bigname" runat="server" Text='<%# Eval("bigclassname")%>' style=" margin-right:25px;"></asp:TextBox>
         URL:<asp:TextBox ID="bigurl" runat="server" Text='<%# Eval("bigclassurl")%>'></asp:TextBox>
         <img  src="images/cal_nextMonth.gif" alt="" style=" margin-bottom:-1px; margin-right:8px; margin-left:25px;"/>
          <asp:LinkButton ID="addsmall" runat="server" CommandName="addsmall">
          <img  src="images/add.gif" alt="" style=" margin-bottom:-4px; margin-right:4px;" />
          添加小类</asp:LinkButton>     
          <asp:LinkButton ID="udatebigclass" CommandName="udatebigclass" runat="server"  style=" margin-left:25px;">
          <img  src="images/state2.gif" alt="" style=" margin-bottom:-4px; margin-right:4px;" />
          更新大类</asp:LinkButton>
          <asp:LinkButton ID="delbigclass" runat="server" CommandName="delbigclass" style=" margin-left:20px;" OnClientClick="return confirm('确定提交修改吗!!\n删除后大类所从属的小类,以及大类所对应的文章都会被删除');">
          <img  src="images/del.gif" alt="" style=" margin-bottom:-4px; margin-right:4px;" />
          删除大类</asp:LinkButton>
      </td>
    </tr>
    <tr>
     <td style="  border-top:0px; ">
     <table style="border-left:1px dotted Black; margin-left:9px; ">
      <asp:Repeater ID="Repeater2" runat="server" OnItemCommand="Repeater2_ItemCommand">
        <ItemTemplate>
        <tr><td style=" padding-left:45px; border:0px;">
           <img src="images/tminus.gif" alt="" style=" margin-bottom:-5px; margin-right:8px;"/>
           <img src="images/folder.gif" alt="" style=" margin-bottom:-3px; margin-right:8px;"/>
           [<%# Eval("smallclassid")%>]
           <asp:HiddenField ID="smallid" runat="server" Value='<%# Eval("smallclassid")%>' />
           名称:<asp:TextBox ID="smallname" runat="server" Text='<%# Eval("smallclassname")%>' style=" margin-right:35px;"></asp:TextBox>
           URL:<asp:TextBox ID="smallurl" runat="server" Text='<%# Eval("smallclassurl")%>' ></asp:TextBox>
           <asp:LinkButton ID="updatesmall" runat="server" CommandName="updatesmall"  style=" margin-left:35px;">
           <img  src="images/cache_reset.gif" alt="" style=" margin-bottom:-4px; margin-right:4px;" />
           更新小类</asp:LinkButton>
           <asp:LinkButton ID="delsmall" runat="server"  style=" margin-left:35px;" CommandName="delsmall" OnClientClick="return confirm('确定提交修改吗!!\n删除后小类所从属的文章都被删除');">
           <img  src="images/false.gif" alt="" style=" margin-bottom:-4px; margin-right:4px;" />
           删除小类</asp:LinkButton>
        </td></tr>
        </ItemTemplate>
      </asp:Repeater>
      </table>
     </td>
    </tr>
   </ItemTemplate>
</asp:Repeater>

<%--    <tr>
      <td class="td1">: 
      </td>
      <td class="td2">
      n
      </td>
    </tr>--%>
</table>
</asp:Content>

